﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

#nullable disable

namespace T4.Console.Db.Models
{
    [Table("Blog_PersonCategory_Map")]
    [Index(nameof(BlogId), nameof(PersonCategoryId), Name = "AK_KEY_2_Blog_PersonCategory_Map", IsUnique = true)]
    [Index(nameof(BlogId), nameof(PersonCategoryId), Name = "Index_1")]
    public partial class Blog_PersonCategory_Map
    {
        [Key]
        [StringLength(36)]
        public string Id { get; set; }
        [Required]
        [StringLength(36)]
        public string BlogId { get; set; }
        [Required]
        [StringLength(36)]
        public string PersonCategoryId { get; set; }
        [StringLength(36)]
        public string CreatedBy { get; set; }
        [Column(TypeName = "datetime")]
        public DateTime? CreatedTime { get; set; }
        [StringLength(36)]
        public string LastModifiedBy { get; set; }
        [Column(TypeName = "datetime")]
        public DateTime? LastModifiedTime { get; set; }

        [ForeignKey(nameof(BlogId))]
        [InverseProperty(nameof(Blog_Info.Blog_PersonCategory_Maps))]
        public virtual Blog_Info Blog { get; set; }
        [ForeignKey(nameof(PersonCategoryId))]
        [InverseProperty(nameof(Blog_PersonCategory.Blog_PersonCategory_Maps))]
        public virtual Blog_PersonCategory PersonCategory { get; set; }
    }
}
